package com.jwm.model;

import org.apache.commons.lang3.StringUtils;

/**
 * @author 崔洁
 */

public enum TypeEnum {
    tomcat("tomcat"),
    jar("jar"),
    service("service"),
    bat("bat"),
    queryFiles("queryFiles"),
    readFile("readFile"),
    downloadFile("downloadFile"),
    build("build");
    private final String label;

    TypeEnum(String label) {
        this.label = label;
    }

    public String getLabel() {
        return label;
    }

    public static TypeEnum valueOfLabel(String label) {
        for (TypeEnum obj : TypeEnum.values()) {
            if (java.util.Objects.equals(obj.label, label)) {
                return obj;
            }
        }
        if (StringUtils.isEmpty(label)) {
            return null;
        }
        return null;
    }
}
